package com.ez.supervise.dao.impl;

import java.util.List;

import com.ez.supervise.core.Page;
import com.ez.supervise.dao.OrgDemocracySumDao;
import com.ez.supervise.dao.base.BaseDaoImpl;
import com.ez.supervise.model.biz.OrgDemocracySum;

public class OrgDemocracySumDaoImpl extends BaseDaoImpl implements OrgDemocracySumDao {

    public void insert(Object orgDemocracySum) {
	sqlMapClientTemplate.insert("biz.insertOrgDemocracySum", orgDemocracySum);
    }

    public Object get(Long id) {
	return (OrgDemocracySum) sqlMapClientTemplate.queryForObject("biz.getOrgDemocracySumById", id);
    }

    public void update(Object org) {
	sqlMapClientTemplate.update("biz.updateOrgDemocracySum", org);
    }

    public void delete(Long id) {
	sqlMapClientTemplate.update("biz.deleteOrgDemocracySum", id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.OrgDemocracySumDao#findByCount(com.ez.supervise.core.Page)
     */
    public int findByCount(Page page) {
	return (Integer) getSqlMapClientTemplate().queryForObject("biz.findOrgDemocracySumByCount", page);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.OrgDemocracySumDao#findByPage(com.ez.supervise.core.Page)
     */
    public List findByPage(Page page) {
	return getSqlMapClientTemplate().queryForList("biz.findOrgDemocracySumByPage", page);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.OrgDemocracySumDao#findAll()
     */
    public List findAll() {
	return getSqlMapClientTemplate().queryForList("biz.findAll");
    }

}
